package com.cskaoyan.service.wx.impl;

import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.po.MarketIssue;
import com.cskaoyan.mapper.MarketIssueMapper;
import com.cskaoyan.service.wx.WxIssueService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jzp
 * @since 2022/11/24 21:04
 */
@Service
public class WxIssueServiceImpl implements WxIssueService {
    @Autowired
    MarketIssueMapper marketIssueMapper;

    @Override
    public CommonData list(Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        List<MarketIssue> marketIssues = marketIssueMapper.selectByExample(null);
        PageInfo<MarketIssue> pageInfo = new PageInfo<>(marketIssues);
        return CommonData.data(pageInfo);
    }
}
